/**
 * Created by xnr on 2020-03-31.
 */
import request from '../utils/fetch'
//不分页,角色详情
export function info (data) {
  return request({
    url: '/role/info',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
//新增角色
export function add (data) {
  return request({
    url: '/role/add',
    method: 'post',
    requestBody: 'body',
    loading: true,
    data: data
  })
}
//不分页,角色列表
export function list (data) {
  return request({
    url: '/role/list',
    method: 'get',
    requestBody: 'null',
    loading: true,
    params: data
  })
}
//修改角色
export function update (data) {
  return request({
    url: '/role/update',
    method: 'post',
    requestBody: 'body',
    loading: true,
    data: data
  })
}
//修改菜单状态
export function updateStatus (data) {
  return request({
    url: '/role/updateStatus',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}

//修改菜单状态
export function updateIf (data) {
  return request({
    url: '/role/updateIf',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}
//删除角色
export function deleteRole (data) {
  return request({
    url: '/role/delete',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}